var t = require("../mixins"), a = getApp();

Page({
    behaviors: [ t ],
    data: {
        active: "",
        listData: [],
        activity_list: [],
        page: 1,
        last_page: 1,
        activity_id: "",
        stage_status: "",
        grand_love_pay: 0,
        grand_point_pay: 0,
        grand_love_returned: 0,
        grand_point_returned: 0,
        grand_love_surplus: 0,
        grand_point_surplus: 0,
        point_name: "",
        love_name: ""
    },
    onLoad: function() {
        this.getdata();
    },
    detail: function(t) {
        var a = t.currentTarget.dataset.id;
        wx.navigateTo({
            url: "/packageF/subscribe/detail/detail?id=" + a
        }), console.log(t);
    },
    activeInfo: function(t) {
        var a = t.detail, e = a.data.stage_list.data || [], n = a.activity_id, i = a.stage_status;
        this.setData({
            page: a.data.stage_list.current_page,
            last_page: a.data.stage_list.last_page,
            active: a.active,
            listData: e,
            activity_id: n,
            stage_status: i
        });
    },
    getdata: function() {
        var t = this;
        a._postNetWork({
            url: a.getNetAddresss("plugin.subscription.frontend.modules.member.controllers.activity.index"),
            success: function(e) {
                if (e.data.result) {
                    var n = e.data.data, i = n.grand_love_pay, s = n.grand_point_pay, r = n.grand_love_returned, o = n.grand_point_returned, _ = n.grand_love_surplus, d = n.grand_point_surplus, l = n.love_name, u = n.point_name;
                    t.setData({
                        activity_list: e.data.data.activity_list,
                        grand_love_pay: i,
                        grand_point_pay: s,
                        grand_love_returned: r,
                        grand_point_returned: o,
                        grand_love_surplus: _,
                        grand_point_surplus: d,
                        love_name: l,
                        point_name: u
                    });
                } else a.tips(e.data.msg);
            }
        });
    },
    getMoreData: function() {},
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onShareAppMessage: function() {}
});